

import service from ".";

// 将所有的针对活动列表的请求，都封装到一个对象中
const doctorSchedulesApi = {
    add(doctorSchedule){
        return service.post(
            '/doctorSchedules',
            doctorSchedule
        ).then(response=>response.data);
    },
    search(params){
        return service.get(
            '/doctorSchedules',
            {params},    // 传递参数
        ).then(response=>response.data);
    },
    edit(doctorSchedule){
        return service.put(
            '/doctorSchedules',
            doctorSchedule,
        ).then(response=>response.data);
    },
    remove(id){
        return service.delete(
            '/doctorSchedules/'+id,
        ).then(response=>response.data);
    },getReservedCount(id){
    return service.get(
        '/doctorSchedules/reservedCount/' + id
    ).then(response => response.data);
}

};

export default doctorSchedulesApi;